<div class="col-md-3">
  <div ng-include="'views/others/templates/sidebar.html'"></div>
</div>
<div class="col-md-9" ng-init="vm.init()">
  <h3 class="page-header">Regex Debugger</h3>
  <form name="form" class="form-check" ng-submit="vm.executeRegex(form.$valid)" novalidate>
    <div class="form-group">
      <label class="control-label">Content</label>
      <textarea class="form-control" rows="5" name="content" ng-model="vm.params.content" autofocus required
          placeholder="Content Text"></textarea>
      <p class="alert alert-danger" ng-show="form.$submitted && form.content.$error.required">
        <i class="glyphicon glyphicon-info-sign"></i> Content is required</p>
    </div>
    <div class="form-group">
      <label class="control-label">Regex</label>
      <input class="form-control" name="regex" ng-model="vm.params.regex" required placeholder="Regex Text">
      <p class="alert alert-danger" ng-show="form.$submitted && form.regex.$error.required">
        <i class="glyphicon glyphicon-info-sign"></i> Regex is required</p>
    </div>
    <div class="form-group">
      <label class="radio-inline">
        <input type="radio" name="mode" value="0" ng-model="vm.params.mode"> Match
      </label>
      <label class="radio-inline">
        <input type="radio" name="mode" value="1" ng-model="vm.params.mode"> Replace
      </label>
    </div>
    <button type="submit" class="btn btn-primary">Execute Regular Expression</button>
    <button type="button" class="btn btn-danger" ng-click="vm.clearAll()">Clear All</button>
  </form>
  <br>
  <div ng-show="true">
    <label>Execute Result</label>
    <pre class="code">{{vm.executeResult}}</pre>
  </div>
</div>
